﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMM.Tapioca.Taxonomy;
using WMM.Tapioca.Linkbase;

namespace WMM.Tapioca.XbrlDimension
{
    /// <summary>
    /// The relationship between a compositor and its operands. 
    /// </summary>
    public class HasHypercube : DRSRelationship
    {

        private Concept primaryItem;

        /// <returns> Primary item of this hypercube. </returns>
        public Concept PrimaryItem
        {
            get { return primaryItem; }
            set { primaryItem = value; }
        }

        private Locator locatorPrimaryItem;

        public Locator LocatorPrimaryItem
        {
            get { return locatorPrimaryItem; }
            set { locatorPrimaryItem = value; }
        }

        private Hypercube hypercube;

        /// <returns> hypercube of this relationship. </returns>
        public Hypercube Hypercube
        {
            get { return hypercube; }
            set { hypercube = value; }
        }

        private List<Dimension> dimensions;

        /// <returns> list of dimension representing this hypercube. </returns>
        public List<Dimension> Dimensions
        {
            get { return dimensions; }
            set { dimensions = value; }
        }

        private string contextElement;

        /// <returns> contextElement of this hypercube. </returns>
        public string ContextElement
        {
            get { return contextElement; }
            set { contextElement = value; }
        }

        private string compositor;

        /// <returns> A set of hypercubes MAY be composed via conjunction of all and notAll compositors. </returns>
        public string Compositor
        {
            get { return compositor; }
            set { compositor = value; }
        }

        private bool summable;

        /// <returns> summable of this hypercube. </returns>
        public bool Summable
        {
            get { return summable; }
            set { summable = value; }
        }

        private bool closed;

        /// <returns> If this hypercube can be extended. </returns>
        public bool Closed
        {
            get { return closed; }
            set { closed = value; }
        }

        /// <param name="compositor">
        /// The compositor this relationship. </param>
        public HasHypercube(string compositor)
        {
            Compositor = compositor;
            dimensions = new List<Dimension>();
        }

    }
}
